import cv2
import numpy as np

img = cv2.imread("myface.jpeg")


#pts1 = np.float32([[50,50],[200,50],[50,200]])
#pts2 = np.float32([[10,100],[200,50],[100,250]])

pts1 = np.float32([[56,65],[368,52],[28,387],[389,390]])
pts2 = np.float32([[0,0],[300,0],[0,300],[300,300]])
M = cv2.getPerspectiveTransform(pts1,pts2)
dst = cv2.warpPerspective(img,M,(300,300))



cv2.imshow("face", img)
cv2.imshow("out", dst)

cv2.waitKey(0)
cv2.destroyAllWindows()
